package org.streets.database;

/**
 * Batch insert/update operation support 
 * 
 * @author dzb
 */
public interface SQLBatcher {
	/**
	 * bean
	 * @param <T>
	 * @param bean
	 * @return
	 */
	public <T> SQLBatcher add(T bean);
	/**
	 * Add batch parameter to batch
	 * @param values PS
	 * @return
	 */
	public SQLBatcher add(PV... values);
	/**
	 * Add batch parameter to batcher
	 * @param use PS.of() method to generate Object[] values
	 * @return
	 */
	public SQLBatcher add(Object[] params);
	/**
	 * 执行Batch
	 * @return
	 */
	public int[] execute();

}